package p2000;

import java.util.Scanner;

public class Main2008数值统计 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t = 0;
        while ((t = scanner.nextInt()) != 0) {
            int a1 = 0, a2 = 0, a3 = 0;
            while (t-- > 0) {
                double n = scanner.nextDouble();
                if (n < 0) {
                    a1++;
                } else if (n == 0) {
                    a2++;
                } else {
                    a3++;
                }
            }

            System.out.print(a1 + " " + a2 + " ");
            System.out.println(a3);
        }
    }

}
